package com.dearbinge.data.dao;

import com.baomidou.mybatisplus.plugins.Page;
import com.dearbinge.data.pojo.userSolicitude.UserSolicitude;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface UserSolicitudeMapper {
    Integer update(UserSolicitude userSolicitude);

    Integer insert(UserSolicitude userSolicitude);

    Integer delete(Integer id);

    UserSolicitude getById(Integer id);

    List<Map<String,Object>> getByUserId(@Param("userId") String userId, @Param("page") Page page);

    String getIsSolicitude(@Param("userId") String userId,@Param("solicitudeId") String solicitudeId);

    Integer cancelSolicitude(@Param("userId") String userId,@Param("solicitudeId") String solicitudeId);

    Integer count(String userId);

    Integer getByUserIdAndSolicitudeId(@Param("userId") String userId,@Param("solicitudeId") String solicitudeId);

    Integer getCountBeConcerned(Integer id);

    List<Map<String,Object>> getBeConcerned(@Param("userId") String userId,@Param("page") Page page);
}
